# from datetime import time
#
# from selenium import webdriver
#
#
# wd = webdriver.Chrome()
# wd.get("https://www.baidu.com")    # 打开百度浏览器
# print(wd.page_source)

from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.uix.card import Card

# Sample data
books = [
    {'title': 'Book 1', 'author': 'Author A', 'year': 2021},
    {'title': 'Book 2', 'author': 'Author B', 'year': 2020},
    {'title': 'Book 3', 'author': 'Author C', 'year': 2019},
]

class CardApp(App):
    def build(self):
        layout = BoxLayout(orientation='vertical', padding=10, spacing=10)
        for book in books:
            card = Card(orientation='vertical', padding=10)
            card.add_widget(Label(text=book['title'], font_size='20sp'))
            card.add_widget(Label(text=book['author'], font_size='16sp'))
            card.add_widget(Label(text=str(book['year']), font_size='16sp'))
            layout.add_widget(card)
        return layout

if __name__ == "__main__":
    CardApp().run()